﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        GLRenderLib.GLRenderControl m_GLRenderControl = new GLRenderLib.GLRenderControl();
        DuDuLuMainLib.DDLControl m_DDLControl = new DuDuLuMainLib.DDLControl();
        public Form1()
        {
            InitializeComponent();
            this.Resize += new EventHandler(OnSize);
            InitGL();
        }

        private void InitGL()
        {
            m_DDLControl.StartGLRender((uint)this.Handle, 0);
            //m_GLRenderControl.StartGLRender((uint)this.Handle, 0);//将Form1的窗口句柄传入GLRender
        }

        private void OnSize(object sender, EventArgs e)
        {
            m_GLRenderControl.OnSize(0, 0, 0, 0);
        }
    }
}
